package lesson15;

import java.util.Arrays;

public class DemoExerPerson {

	public static void main(String[] args) 
	{
		ExerPerson p1 = new ExerPerson();
		ExerPerson p2 = new ExerPerson();
		
		p1 = new ExerPerson("Ivan", "6874654", true);
		
		p1.friends = new ExerPerson[3];
	
		p2.friends = new ExerPerson[3];
		p2.friends[0] = new ExerPerson();
		/*
		System.out.println(p1.name);
		System.out.println(p1.peronalNumber);
		System.out.println(p1.isMale);
		
		
		
		System.out.println(p2.friends[0].name);
		System.out.println(p2.friends[0].isMale);
		
		*/
		
		ExerPerson buyer = new ExerPerson("Penko", "87455212546", true, 6000.1);
		
		ExerciseCar nissan = new ExerciseCar("primera", "grey", 6000, 198, 6, "nissan", null);
		buyer.buyCar(nissan);
		
		System.out.println();
		System.out.println(buyer.car.brand);
		
		System.out.println((buyer.money));
		System.out.println(nissan.owner.name);
	}

}
